#ifndef CSGUTS_H
#define CSGUTS_H

#include "slotguts.h"
#include "cscrdhand.h"

// CSN-11524: When getting random value, make sure data type in the database does not overflow (int datatype, 2^31-1)
#define MAX_DECK_DATATYPE_SIZE 2147483647

class CardSharkSlotGuts : public SlotGuts
{
	public:
        virtual int32 getMaxAggregate();
		virtual void playBonusGame(uint8 bonusGameType, int32 bonusDataCount, int32 *bonusData);
	    virtual void classifyScatters(SlotSpin *spin);
		virtual bool8 saveGame();
		virtual bool8 isGameComplete();
		/**
         * @brief Whether this game uses saved games.
         */
        virtual bool8 hasSavedGames(){return true;};


	protected:

		void initializeSharkAttack();

        virtual bool8 isValidGuts();
		uint8 classifyStops(uint8 *, uint8, uint8);
		bool8 haveBonusGame;
		bool8 readytofinish;

        virtual SlotSpin *makeJackpot();
		int32 totalBet;
		int32 numGoodPicks;
		int64 currentGameNum;

		void rebuildHand();
		CardSharkHand*		hand;		

        enum SUBGAMEDEFS
        {
 			SGNOTPICKED = -1,
			BGNONE = 0,
			BGCHESTS = 1,
			BGCARDSHARK = 2,
			BGCSHIGH = 3,
			BGCSLOW = 4,
        };
        
        enum SUBGAMEIDX
        {
			SGIDX_BONUSGAME,
			SGIDX_CHESTONEY,
			SGIDX_CHESTTWOY,
			SGIDX_CHESTTHREEY,
			SGIDX_CHESTVALUE,
			SGIDX_CSNEXTPICKVAL,
			SGIDX_CSCARDONE,
			SGIDX_CSCARDTWO,
			SGIDX_CSCARDTHREE,
			SGIDX_CSCARDFOUR,
			SGIDX_CSCARDFIVE,
            SGIDX_CSPICKONE,
            SGIDX_CSVALUEONE,
            SGIDX_CSPICKTWO,
            SGIDX_CSVALUETWO,
            SGIDX_CSPICKTHREE,
            SGIDX_CSVALUETHREE,
			SGIDX_CSPICKFOUR,
			SGIDX_CSVALUEFOUR,
			SGIDX_CSPICKFIVE,
			SGIDX_CSVALUEFIVE,
			SGIDX_CSSERVDECKSEED,
			SGIDX_CSSERVCARDTWO,
			SGIDX_CSSERVCARDTHREE,
			SGIDX_CSSERVCARDFOUR,
			SGIDX_ISDONE,
            SG_SZ,
        };


};

#endif


